package com.umakr.ax.opt.web;

import com.umakr.ax.core.base.AbstractController;
import com.umakr.ax.opt.service.AreaOptService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 * ${table.comment}  前端控制器
 * </p>
 *
 * @author Umakr-Code-Generator
 * @since 2017-12-30
 */
@Controller
@RequestMapping("/api/opt/area")
public class AreaOptController extends AbstractController {

	@Autowired
	AreaOptService areaOptService;

	@ApiOperation(value = "电台地区列表")
	@GetMapping("/listAreaNodesByPid")
	@ResponseBody
	public Object listAreaNodesByPid(ModelMap modelMap,@RequestParam(name = "pId") Long pId) {
		return setSuccessModelMap(modelMap,areaOptService.listAreaNodesByPid(pId));
	}

}